package controller;

import sun.security.smartcardio.SunPCSC;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
import java.util.stream.Collectors;

public class lamuda {

    static {

    }

    public static void main(String[] args) {

        final ArrayList<Person> objects = new ArrayList<>();
        final Person person = new Person("zs", "wuhu", 1);
        final Person person1 = new Person("zs", "wuhu", 0);
        final Person person2 = new Person("zs", "wuhu", 2);
        final Person person4 = new Person("zs", "wuhu", 2);
        objects.forEach(e->{

        });

        final HashMap<Integer, Boolean> objectObjectHashMap = new HashMap<>();
     objectObjectHashMap.put(1,true);
     objectObjectHashMap.put(1,false);
     objectObjectHashMap.put(2,false);
     objectObjectHashMap.put(3,true);
     Map.Entry<Integer, Boolean> integerBooleanEntry = objectObjectHashMap.entrySet().stream().filter(Map.Entry::getValue).max((e, v) -> e.getKey()).get();
        System.out.println(integerBooleanEntry);






        objects.add(person);
        objects.add(person1);
        objects.add(person2);
        objects.add(person4);

        //final String collect = objects.stream().filter(e -> e.getCode() == 2).map(Person::getName).collect(Coll);



    }
}
